package com.blackink.mapper;

import com.blackink.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;


@Mapper
@Repository
public interface UserMapper {

    User queryUserByName(@Param("name") String name);

    List<User> queryUserList(
            @Param("name") String userName,
            @Param("phone") String phone,
            @Param("start") String start,
            @Param("end") String end);

    Integer addUser(@Param("user") User user);

    Integer addUserRole(@Param("user") User user,@Param("roleId") Integer roleId);

    List<User> queryUser(String LoginName);

    Integer loginUpdate(@Param("id") Integer id,@Param("IP") String Ip,@Param("date") String date);
}
